package oo.fengzhuang;

import java.util.ArrayList;
import java.util.List;

public class Person {
    private String name;
    private int age;
    protected List<String> configs = new ArrayList<>();
    public static final boolean QUAN_LI = true;

    public Person() {
        System.out.println("父类");
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void say() {
        System.out.println("say Hello");
    }

    protected boolean addConfigs(String config) {
        return configs.add(config);
    }

    public void work() {
        int i = 0;
        do {
            if (i > 100) {
                break;
            }
            doEveryDay();
            i++;
        } while (true);
    }

    public void doEveryDay() {
        // do noting by default
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public List<String> getConfigs() {
        return configs;
    }

    public void setConfigs(List<String> configs) {
        this.configs = configs;
    }
}
